import type { Rule } from 'ant-design-vue/lib/form'

const validatePhone = async (_rule: Rule, value: string) => {
  if (!value) {
    return Promise.reject('请输入手机号码')
  }
  return Promise.resolve()
}

export const formRule: Record<string, Rule[]> = {
  deptName: [
    {
      required: true,
      message: '请输入部门名',
      trigger: 'blur'
    }
  ],
  leaderIds: [
    {
      required: true,
      message: '请选择部门领导',
      trigger: 'blur'
    }
  ]
}
